POV-Ray : Newsgroups : povray.general : POV-CSDL (or Java Binding?) : POV-CSDL (or Java Binding?) Server Time
10 Aug 2024 03:26:05 EDT (-0400)
  POV-CSDL (or Java Binding?)  
From: Johannes Hubert
Date: 12 Mar 2000 07:37:31
Message: <38cb8f8b@news.povray.org>
Hi!

I moved this here from povray.off-topic, since it was getting more and
more on-topic (and also being related to the much discussed "The
Language of POV-Ray" thread).

Chris Huff made the suggestion of creating some sort of POV-CSDL ("C
like Scene Description Language") in the thread "Programming in
Highshool" in off-topic. That would be a language based on C or C++ to
be used to create POV-scenes. The scene would then be run through a sort
of "compiler" to create a "real" POV-Script from it.
The idea was, that only the "programmers" among us would want to write
CSDL scripts (for example for complex includes/plug-ins) and that normal
users could simply include the produced "normal" POV-Script into their
scenes, not having to worry about the CSDL at all - they could simply
ignore that part.
A CSDL plug-in would thus be published as two sources: A CSDL source and
a POV-Script source. "Programmers" could use the CSDL source to modify
the plugin to their own needs, and "Users" could use the POV-Script
(compiled from the CSDL) to use the plug-in in their scenes.
Sounds like a good compromise to me, having all the arguments from "The
Language of POV-Ray" in mind.

However, I think the approach can be made a lot easier, by not creating
a new language that would need a parser and compiler, but by simply
creating a binding in an already existing language. In the original
thread someone pointed out the efforts to create a Perl binding.
Personally I don't like Perl ;) but this whole thing reminded me of a
topic I brought up a while ago: A Java binding of POV.

Back then I realized that this would be a fully academic exercise, since
it was clear that no-one would actually program scenes in a POV-Java
binding.
But under the new light of using the binding to create
"high-level-language" plugins, that can still be used by "normal" users
without the need to know anything about the binding, this approach
sounds again interesting (at least to me :)

Here is how it would work:

A number of packages (class libraries) would be written in Java to
support the POV-objects. A "programmer" could then use these packages to
program POV scripts (with focus on plugins, not on full scenes) directly
in Java, in a manner intuitive to programmers.
The resulting Java program would, if compiled and run, create a standard
POV-Script plugin which could be included into any POV-Scene, and which
would contain any macro and object created in the Java-Script.
The programmer could publish both the Java code (to make his plugin
modifiable by other programmers) and the resulting POV-Scene (to make
the plugin usable by "normal" users) (usually both would be published
together).

The advantage over the CSDL approach would (in my eyes) be that no "new"
language is needed. Why create a parser and compiler, if it is already
there, for example in the Java parser, compiler and runtime environment?

Chris, what do you think?

Others?

Johannes.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.